{literal}
<!--<link rel="stylesheet" href="style/autosuggest.css" type="text/css" />
<script type="text/javascript" src="js/jquery.ausu-autosuggest.min.js"></script>-->

<link type="text/css" rel="stylesheet" href="style/lightbox-form.css">
<script src="js/lightbox-form.js" type="text/javascript"></script>
<script language="javascript" src="js/contact_us.js"></script>
<link type="text/css" href="jss/tipTip.css"  rel="stylesheet"  />
<!--<script src="jss/jquery-1.6.2.js" type="text/javascript"></script>-->
<script src="jss/jquery.tipTip.js" type="text/javascript"></script>

<script language="javascript">
// var $ = jQuery.noConflict();
jQuery(function(){
	jQuery(".someClass").tipTip();
});

function CheckFields(formID,NumRatingCat)
{
   var r_comment = document.getElementById('review_comment').value;
   var NumRatingCat = NumRatingCat;	 	 	 	 
   var training_partner_id = document.getElementById('training_partner_id').value;
   var reviewed_by = document.getElementById('logged_user').value;
   
   if(document.getElementById('review_comment').value=='')
   {
    jQuery('#review_comment').css('border','1px solid #FF0000');
		return false;
   }
   else 
   jQuery('#review_comment').css('border','1px solid #ccc');
	
	var frmID='#'+formID;
	
	var params ={

		'action': 'sendreview',
		'NumCoachRatingCat': NumRatingCat,
		'IsProcess': 'Y',
		//'coach_id': coach_id,
		'reviewed_by': reviewed_by
	};

	var paramsObj = jQuery(frmID).serializeArray();
	
	jQuery.each(paramsObj, function(i, field){

		params[field.name] = field.value;

	});
	
   if(r_comment!='')
   {
	   jQuery.ajax({
		type: "POST",
		url: 'training_partner_details.php?training_partner_id='+training_partner_id,
		data: params,
		dataType : 'text',
		success: function(data){
		//if (data.flag == '1')
		  //{
		     jQuery('.signin-message').fadeIn(0);
			 jQuery('#msgbox').fadeIn(0);
		     jQuery('#msgbox').html('Review posted successfully.');
		     jQuery('.signin-message').fadeOut(5000);
			 jQuery('#paging').html(data);
		 // }
        }
      });
	  document.getElementById("review_comment").value='';
	  document.getElementById('serialStar').value='';
	  closebox();
	}
  }		
	
function submit_message_text()
{	
	var message_text=jQuery('#message_text').val();
	var user_id_to=jQuery('#user_id_to').val();
	var user_id_from=jQuery('#user_id_from').val();
	var reply_of_msg=jQuery('#reply_of_msg').val();
	
	if(message_text == ""){
		jQuery('#message_text').css('border','1px solid #FF0000');
		return false;
	}	
	else{
		jQuery('#message_text').css('border','1px solid #ccc');
	
		$.ajax({
			   url:'reply.php',
			   data:'flag=1&message_text='+message_text+'&reply_of_msg='+reply_of_msg+'&user_id_to='+user_id_to+'&user_id_from='+user_id_from,
			   type:'post',		  
			   success:function(resp){
			        jQuery('.signin-message').fadeIn(0);
			        jQuery('#msgbox').fadeIn(0);
					jQuery('#msgbox').html('Message sent successfully. An email notification is also sent with your message.');
					jQuery('.signin-message').fadeOut(5000);
			   } 		   
		});
		
		document.getElementById("message_text").value='';
		closereplybox();
	}
	
}

function closereply()
{
	document.getElementById("message_text").value='';
	jQuery('#message_text').css('border','1px solid #ccc');
	closereplybox();
}
function closereviewbox()
{
	document.getElementById("review_comment").value='';
	document.getElementById("serialStar").value='';
	jQuery('#review_comment').css('border','1px solid #ccc');
	closebox();
}

</script>  
{/literal}
{if $IsProcess neq 'Y'}
<div class="right-panel">
      <div class="findcoach-title" style="margin-bottom: 5px;">
		<div class="title" style="float: left;padding: 0;border: none;"><a style="text-decoration: none;" href="find_training_partner.php">Find Training Partner</a></div>
         
        <div class="breadcrumb">{$tpArr.name}</div>
         <div class="clear"></div>
      </div>

	  <div class="clear"></div>
      <div class="game-list-block">
	  
         <div class="game-image-block">
			{if $tpArr.photo neq ''}
		     <img src="uploaded/user_images/thumbs/big_{$tpArr.photo}" alt="Training Partner" border="0" />
			{else}
			 <img src="images/coach_thumb.jpg" border="0" /> 
			{/if} 
		</div> 
		    
         <div class="game-details-block">
            <div class="score_title coachname">
				<h4 class="gameshead">
					<a class="{$online_status}" title="{$online_status}"></a>
					{$tpArr.name} 
					<a id="{$tpArr.user_id}_friendStar" class="{if $isfriend eq 'y'}star_friend{else}star_not_friend{/if}" title="{if $isfriend eq 'y'}in your friend list{else}not your friend list{/if}"></a>
				</h4>
				{if $smarty.session.user_id neq '' && $smarty.session.user_id neq $tpArr.user_id}
				<div class="addAsFriendWindow">
					<a class="addAsFriendLink" href="javascript:;">Message</a><br/>
					{if $isfriend eq 'n'}
					<a class="addAsFriendLink" href="javascript:;" onclick="addAsFriend(event,'{$tpArr.user_id}','{$tpArr.name}')">Add as friend</a>
					{else}
					<a class="addAsFriendLink" href="javascript:;" onclick="removeFriend(event,'{$tpArr.user_id}','{$tpArr.name}')">Remove friend</a>
					{/if}
				</div>
				{/if}
			</div>
			<div class="score_card">
		   <div id="scoreCard">
			<ul>{if $tpOverallArr.overall_rating neq 0}
				<li id="Overall" class="tTip">
				<span class="someClass" title="{$tpOverallArr.rating_overall_tooltip}">
				<strong>{$tpOverallArr.overall_rating}</strong><span>Overall</span>
				</span>
				</li>
				{/if}
				{section name=k loop=$CatIndividualRec}
				{if $CatIndividualRec[k].rating_category eq 'Knowledge'}
				<li id="Knowledge" class="tTip">
				<span class="someClass" title="{$CatIndividualRec[k].rating_category_tooltip}">
				<strong>{$CatIndividualRec[k].rating}</strong><span>{$CatIndividualRec[k].rating_category}</span>
				</span>
				</li>
				{/if}
				{if $CatIndividualRec[k].rating_category eq 'Structure'}
			   <li id="Structure" class="tTip">
			   <span class="someClass" title="{$CatIndividualRec[k].rating_category_tooltip}">
			   <strong>{$CatIndividualRec[k].rating}</strong><span>Structure</span>
			   </span>
			   </li>
			   {/if}
			   {if $CatIndividualRec[k].rating_category eq 'Communication'}
				<li id="Communication" class="tTip">
				<span class="someClass" title="{$CatIndividualRec[k].rating_category_tooltip}">
				<strong>{$CatIndividualRec[k].rating}</strong><span>Communication</span>
				</span>
				</li>
				{/if}
				{if $CatIndividualRec[k].rating_category eq 'Professionalism'}
				 <li id="Professionalism" class="tTip">
				 <span class="someClass" title="{$CatIndividualRec[k].rating_category_tooltip}">
				 <strong>{$CatIndividualRec[k].rating}</strong><span>Professionalism</span>
				 </span>
				 </li>
				 {/if}
				{/section}
			</ul>
                </div>
		      </div>
            <br />
            <p class="clear"></p>
			<div class="games-desc partner_game_details" style="margin-top: 10px;">
				<dl>
					<dt>Language:</dt>
					<dd>{$tpArr.language}</dd>
				</dl>
				{if $tpArr.avail_local eq 'Y'}
				<dl>
					<dt>City (Local meet-up):</dt>
					<dd>{if $tpArr.availability_city neq ''}{$tpArr.availability_city}{else}N/A{/if}</dd>
				</dl>
				{/if}
				<dl>
					<dt>Availability:</dt>
					<dd>{if $tpArr.availability_type neq ''}{$tpArr.availability_type}{else}N/A{/if}</dd>
				</dl> 
				<dl>
					<dt>Introduction:</dt>
					<dd><div>{if $tpArr.description neq ''}{$tpArr.description}{else}N/A{/if}</div></dd>
				</dl>
			</div>
            {section name=game loop=$tpgameArr}
			<div class="games-desc partner_game_details" style="margin-top: 15px;">
				<h2>{$tpgameArr[game].game}</h2>
				<div style="margin-left: 15px;">
					<dl>
						<dt>Peak Hours:</dt>
						<dd>{if $tpgameArr[game].peak_hours neq ''} {$tpgameArr[game].peak_hours}{else}N/A{/if}</dd>
					</dl> 
					{if $tpgameArr[game].is_ladder eq 'Y'}
					<dl>
						<dt>Ladder:</dt>
						<dd>{if $tpgameArr[game].ladder neq ''} {$tpgameArr[game].ladder} {else} N/A {/if}</dd>
					</dl>
					{/if}
					{if $tpgameArr[game].is_server eq 'Y'}
					<dl>
						<dt>Server:</dt>
						<dd>{if $tpgameArr[game].server neq ''} {$tpgameArr[game].server} {else} N/A {/if}</dd>
					</dl>
					{/if}
					{if $tpgameArr[game].is_region eq 'Y'}
					<dl>
						<dt>Region:</dt>
						<dd>{if $tpgameArr[game].region neq ''} {$tpgameArr[game].region} {else} N/A {/if}</dd>
					</dl> 
					{/if}
					{if $tpgameArr[game].is_race eq 'Y'}
					<dl>
						<dt>Race:</dt>
						<dd>{if $tpgameArr[game].race neq ''} {$tpgameArr[game].race} {else} N/A {/if}</dd>
					</dl> 
					{/if}
					{if $tpgameArr[game].is_rating eq 'Y'}
					<dl>
						<dt>Rating:</dt>
						<dd>{if $tpgameArr[game].rating neq ''} {$tpgameArr[game].rating} {else} N/A {/if}</dd>
					</dl> 
					{/if}
					<dl>
						<dt>Experience:</dt>
						<dd><div>{if $tpgameArr[game].experience neq ''}{$tpgameArr[game].experience}{else}N/A{/if}</div></dd>
					</dl> 
					<dl>
						<dt>Need Improvement In:</dt>
						<dd><div>{if $tpgameArr[game].need_improvement neq ''}{$tpgameArr[game].need_improvement}{else}N/A{/if}</div></dd>
					</dl> 
				</div>
			</div>
			{/section}
            <div class="clear" style="padding-top:10px;"></div>
			{if $smarty.session.user_id neq '' && $smarty.session.user_id neq $tpArr.user_id}
			<div style="margin-top:10px;float: right;">
				<a style="margin-top:10px;float: right;" class="button" href="javascript:void(0);" onClick="openbox('Review and Rating for <b>{$tpArr.name}</b>', 1)"><span>Review</span></a>
				<a style="margin-top:10px;float: right;" class="button" href="javascript:void(0);" onClick="openreplybox('Send message to <b>{$tpArr.name}</b>', 1)"><span>Message</span></a>
			</div>
			 <!--<div class=""  style="margin-top:15px;margin-right:{if $smarty.session.user_type eq '2'}{if $is_fav eq '0'}10{else}7{/if}{else}0{/if}px;float: right;"></div>
           
			  <div class="" style="margin-right:{if $smarty.session.user_type eq '2'}{if $is_fav eq '0'}10{else}10{/if}{else}10{/if}px;float: right;">
			  <a href="javascript:void(0);" class="button" onClick="openreplybox('Send message to <b>{$tpArr.name}</b>', 1)"><span>Message</span></a>
			  </div>-->
			  
			  <br /> <div class="clear"></div>
		             <div class="signin-message" style="display:none;">
                     <div id="msgbox" style="color:#0077BC;"></div>
		             </div>
			  
			  
		   {/if}
         </div>
         <div class="clear"></div>
      </div>
	  
	  {if $Numvideo > 0}
      <div class="game-list">
         <h2 title="Video">Videos</h2>
         <div class="clear"></div>
		 {section name=video loop=$tpvideoArr}
		 
		 {assign var='i' value=$smarty.section.video.index+1}
          <div {if $i%3 eq '0'} class="games-replay-last" {else} class="games-replay" {/if}>
          
          		<div class="replay-content">
			   <a href="videodetails.php?video_id={$tpvideoArr[video].video_id}">
			   <img src="uploaded/video_images/thumbs/mid_{$tpvideoArr[video].video_image}" alt="" title="{$tpvideoArr[video].video_title}" border="0"  /></a>
			   </div>
			   <div class="replay-content">
				  <div class="replay-title"><a href="videodetails.php?video_id={$tpvideoArr[video].video_id}">{$tpvideoArr[video].video_title}</a><br />
                  <span class="date">{$tpvideoArr[video].video_date}<br />
				  {if $tpvideoArr[video].time_length neq ''}{$tpvideoArr[video].time_length} min{else} N/A {/if}
				  </span></div>
				  <div class="game-rating">
				  <strong>Likes :</strong>&nbsp;{$tpvideoArr[video].numlike}	
				  <br />
				  <strong>Disikes :</strong>&nbsp;{$tpvideoArr[video].numunlike}
				  <br />
				  <strong>Views :</strong>&nbsp;{$tpvideoArr[video].view_count}				 
				  </div>
                  <div class="replay-title" style="padding-top:0px; width:90%"><span class="date">Game : <em>{$tpvideoArr[video].game}</em></span></div>
			   </div>
				  
          </div>
         
		  {if $i%3 eq '0'}
            <div class="clear"></div>
	      {/if}		
		 {/section}
		<div class="clear"></div> 
      </div>
	  {/if}{/if}
      <div class="clear"></div>
	  <div id="paging"> 
	 <div id="review">
     <div class="review-list">
     <h2 title="Review">Reviews</h2>
	  {if $NumReview >0}
       <div class="clear"></div>
	    {section name=rrow loop=$UserReview}
		 <div class="review-block">
             
			 <div class="review-left">
			 <a href="{$UserReview[rrow].userlink}">
			  <img src="{$UserReview[rrow].img}" height="92" width="105"  alt="{$UserReview[rrow].review_by}" border="0" />
			 </a>
			 </div>
			 <div class="review-right">
			 <div class="review-sub-title">
             
             	<div class="review_thumb_block">
				 <h4 class="reviewshead">Reviewed By : <a href="{$UserReview[rrow].userlink}">{$UserReview[rrow].review_by}</a></h4><br/><br />
	 			 
				 <span><em>Posted on</em></span> : {$UserReview[rrow].r_date}<br /><br />
				 {if $UserReview[rrow].review_comment neq ''}
				 <p><i>Review</i>:&nbsp;{$UserReview[rrow].review_comment|nl2br}</p><br />
				 {/if}
				</div>
                
                <div class="review_card_block">
                 <!-- Score Area -->
                <div id="scoreCard">
                    <ul>
						{if $UserReview[rrow].overall_r neq 0}
                        <li id="Overall" class="tTip">
						<span class="someClass" title="{$UserReview[rrow].rating_overall_tooltip}">
						<strong>{$UserReview[rrow].overall_r}</strong><span>Overall</span>
						</span>
						</li>
						{/if}
						{section name=k loop=$UserReview[rrow].individual}
						{if $UserReview[rrow].individual[k].rating_category eq 'Knowledge'}
                        <li id="Knowledge" class="tTip">
						<span class="someClass" title="{$UserReview[rrow].individual[k].rating_category_tooltip}">
						<strong>{$UserReview[rrow].individual[k].rating}</strong>
						<span>{$UserReview[rrow].individual[k].rating_category}</span>
						</span>
						</li>
						{/if}
						{if $UserReview[rrow].individual[k].rating_category eq 'Structure'}
                       <li id="Structure" class="tTip">
					   <span class="someClass" title="{$UserReview[rrow].individual[k].rating_category_tooltip}">
					   <strong>{$UserReview[rrow].individual[k].rating}</strong><span>Structure</span>
					   </span>
					   </li>
					   {/if}
					   {if $UserReview[rrow].individual[k].rating_category eq 'Communication'}
                        <li id="Communication" class="tTip">
						<span class="someClass" title="{$UserReview[rrow].individual[k].rating_category_tooltip}">
						<strong>{$UserReview[rrow].individual[k].rating}</strong><span>Communication</span>
						</span>
						</li>
						{/if}
						{if $UserReview[rrow].individual[k].rating_category eq 'Professionalism'}
                         <li id="Professionalism" class="tTip">
						 <span class="someClass" title="{$UserReview[rrow].individual[k].rating_category_tooltip}">
						 <strong>{$UserReview[rrow].individual[k].rating}</strong><span>Professionalism</span>
						 </span>
						 </li>
						 {/if}
						{/section}
                    </ul>
                </div>
                </div>
                
                <div class="clear"></div>
				<!-- Score Area END -->
                 
			 </div>
			 <!--p class="post"><span>Posted on</span> : {$UserReview[rrow].r_date}</p-->
			 </div>
			 <div class="clear"></div>
		</div>
		 
	    {/section}
      
	  {if $pagination_arr[1]}
      <div class="clear"></div>
      <div class="pagin">
         <ul>
            {$pagination_arr[1]}
         </ul>
      </div>
	  {/if}
	  {else}
	   No reviews
	{/if} 
	</div>
   </div>	
  </div>	 
  </div> 
<div id="shadowing"></div>
<div id="box">
  <h2><span id="boxtitle"></span></h2>
  <!--div style="font-size:14px;">Review and rating For <b>{$CoachArr.name}</b> </div-->
   <div class="review">
   <!--div id='replyMsg' style="color:#009933; font-size:14px;text-align:center; padding-bottom:5px;"></div-->
   <div id='FormErrorMsg' style="color:red; text-align:center; padding-bottom:5px;">{if $ermsg neq ''} {$ermsg}{/if} </div>
   <form name="contact" id="Rating_Coach"  method='post' action="" onsubmit="return false;">
   <input type="hidden" name="training_partner_id" id="training_partner_id" value="{$training_partner_id}" />
   <input type="hidden" name="logged_user" id="logged_user" value="{$logged_user}" />
   <input type="hidden" name="user_type_id" id="user_type_id" value="3" />
   <table width="100%" cellpadding="0" cellspacing="0" class="rev">
	  
	   <tr>
	   <td class="tTip"><span class="someClass" title="{$tpOverallArr.rating_overall_tooltip}">Overall :</span> </td>
	   <td>
	   <div class="kan">
	   	1&nbsp;<input type="radio" value="1" name="Rating_overall" id="serialStar" title="Poor">
		2&nbsp;<input type="radio" value="2" name="Rating_overall" id="serialStar" title="Ok">
		3&nbsp;<input type="radio" value="3" name="Rating_overall" id="serialStar" title="Good">
		4&nbsp;<input type="radio" value="4" name="Rating_overall" id="serialStar" title="Better">
		5&nbsp;<input type="radio" value="5" name="Rating_overall" id="serialStar" title="Awesome">	 
	  </div>  
		<!--<div class="comment"> <input type="text" value="" name="Comment_overall" id="Comment_overall"></div>-->
		</td>
	   </tr>
	   
		<tr>
		<td></td>
		<td>
		<br /><br />		</td>
		</tr>

       {section name=i loop=$RatingCatArr}
	   <tr>
	   
	    <td class="tTip">
		 <span class="someClass" title="{$UserReview_Individual[i].rating_category_tooltip}">{$RatingCatArr[i].rating_category}:</span>
		 </td>
	   
	   	<!--<td>{$RatingCatArr[i].rating_category}:</td>-->
		 <td colspan="2"> <div class="kan">
		1&nbsp;<input type="radio" value="1:{$RatingCatArr[i].rcat_id}" name="Rating_{$smarty.section.i.index}" id="serialStar" title="Poor">
		2&nbsp;<input type="radio" value="2:{$RatingCatArr[i].rcat_id}" name="Rating_{$smarty.section.i.index}" id="serialStar" title="Ok">
		3&nbsp;<input type="radio" value="3:{$RatingCatArr[i].rcat_id}" name="Rating_{$smarty.section.i.index}" id="serialStar" title="Good">
		4&nbsp;<input type="radio" value="4:{$RatingCatArr[i].rcat_id}" name="Rating_{$smarty.section.i.index}" id="serialStar" title="Better">
		5&nbsp;<input type="radio" value="5:{$RatingCatArr[i].rcat_id}" name="Rating_{$smarty.section.i.index}" id="serialStar" title="Awesome"></div><!--<div class="comment" ><input type="text" value="" name="Comment_{$smarty.section.i.index}" id="Comment_{$smarty.section.i.index}">
		<input type="hidden" value="{$RatingCatArr[i].rcat_id}" name="comment_rating_{$smarty.section.i.index}" id="comment_rating_{$smarty.section.i.index}" /></div>-->		</td>
		<tr>
		<td></td>
		<td>
		
		<br /><br />		</td>
		</tr>
	   </tr>
	   {/section}
	   <tr><td colspan="3">&nbsp;</td></tr>
	    <tr>
	   	<td width="43%" valign="top">Review :</td>
		<td width="54%"><textarea name="review_comment" id="review_comment" cols="15" rows="5" >{$Formval.user_about}</textarea></td>
	   </tr>
	   <tr><td colspan="3">&nbsp;</td></tr>
	   <tr>
	   	<td colspan="3" align="center">    
		    <input name="submit" class="submit" value="Submit" type="submit" onclick="return CheckFields('Rating_Coach',{$NumRatingCat})" />
            <input name="" class="cancel" value="Cancel" type="button" onClick="closereviewbox()" />		</td>
	   </tr>
   </table>
   
  
  </form>
  
 </div> 
</div>
<div id="shadowreply"></div>
<div id="replybox">
 <h2><span id="replytitle"></span></h2>
  <!--div style="font-size:14px;">Message to <b>{$CoachArr.name}</b> </div-->
   <div class="review">   
   <form name="contact" id="Contact"  method='post' action="" onsubmit="return false;">
   <fieldset> 
   <label>Message :</label>
    <textarea rows="10" cols="40"  name="message_text" id="message_text" class=""></textarea>	  
    <input name="flag" type="hidden" value="1" />
	<input name="user_id_to" id="user_id_to" type="hidden" value="{$tpArr.user_id}" />
    <input name="user_id_from" id="user_id_from" type="hidden" value="{$smarty.session.user_id}" />
    <input name="reply_of_msg" id="reply_of_msg" type="hidden" value="0" /> 
	<p class="clear"></p>
	 <label>&nbsp;</label>            
			<input name="snd_message_text" type="submit" class="submit" value="Submit" onclick="return submit_message_text()"/> 
            <input name="" class="cancel" value="Cancel" type="button" onClick="closereply()" />
   </fieldset> 
  </form> 
 </div> 
</div>
